<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
  <base href="<%=basePath%>">
  <meta charset="utf-8" />
  <title>123</title>
  <link href="static/mycss/bootstrap.min.css" rel="stylesheet" />
  <script src='static/js/jquery-1.9.1.min.js'></script>
  <script src='static/js/commonJs.js${getTime}'></script>
    <script src='static/js/blacklistandantifraud.js'></script>
    <script type="text/javascript" src="static/js/layer.js"></script>
    <%--<script type="text/javascript" src="static/js/lay/layui.js"></script>--%>
    <%--<link rel="stylesheet" href="static/css/layui.css" media="all">--%>
    <script type="text/javascript" src="static/layui/layui.js"></script>
    <link rel="stylesheet" href="static/layui/css/layui.css" media="all">
    <link href="static/sweetalert/sweetalert.css" rel="stylesheet" />
    <script src='static/sweetalert/sweetalert.min.js'></script>
    <script type="text/ecmascript" src="static/js/jqgrid/grid.locale-en.js"></script>
    <script type="text/ecmascript" src="static/js/jqgrid/jquery.jqGrid.min.js"></script>
    <script type="text/ecmascript" src="static/js/jqgrid/jqGridCommon.js${getTime}"></script>
    <link rel="stylesheet" type="text/css" media="screen" href="static/js/jqgrid/ui.jqgrid-bootstrap.css" />
    <%--<script type="text/javascript" src="static/js/batch.js"></script>--%>
    <script type="text/javascript">
        $(top.hangge());
        layui.use('element', function(){
            var $ = layui.jquery,
                    element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
        });
    </script>
    <style>
        .divcss5{width:100px;height:20px;}

        .table-info tbody{
            border-radius: 8px;
            box-shadow: 10px 0 20px #edf4fe;
        }
        .table-info tr td:nth-child(odd){
            background: #f1f8ff;
        }
        .title-show{
            width: 114px;
            height: 46px;
            background: rgba(199,225,254,.9);
            text-align: center;
            line-height: 46px;
        }
        .title-show:after{
            content: "";
            display: block;
            width: 0;
            height: 0;
            border-bottom: 46px solid rgba(199,225,254,.9);
            border-right: 38px solid transparent;
            position: relative;
            left: 114px;
            top: -46px;
        }
        .star-tips:before{
            content: '';
            display: block;
            width: 40px;
            height: 70px;
            background-size: 80%;
            background: url("static/images/icon-c.png") no-repeat;
            position: absolute;
            top: -8px;
            left: -12px;
        }
    </style>
    <script type="text/javascript">
        $(function(){
            dd0();
            setTimeout(function(){dd();dd1();getCallBook();},60);
            dd3();
            dd4();
            dd5();
        });
        //联系人列表
        function dd0(){
            console.log("执行dd0()ajax")
            var url ="cuijimanage/doLinkManList.do?callLoanNid="+"${callLoanInfo.callLoanNid}"+"&&userId="+"${callLoanInfo.userId}"+"&&flag="+"nei";
            $.ajax({
                type: "post",
                url: url,
                success: function (result) {
                    $("#linkManlist").html(result);
                }
            });
        }
        
		function getCallTime(value,o){
			var abc = document.createElement("AUDIO"), dateTime = "";
			$(abc).attr("src","http://" + '${callRecordFilePageIp}'
				+ "/uncall_api/downloadFile.php?f_path=" + value);
			var secondToDate = function(result) {
				var h = Math.floor(result / 3600);
				var m = Math.floor((result / 60 % 60));
				var s = Math.floor((result % 60));
				var resultH = "00:",resultM = "00:",resultS = "00:";
				var add0 = function(m){return m<10?'0'+m:m };
				if(h != 0){
					resultH =  add0(h) + ":";
				}
				if(m != 0){
					resultM =  add0(m) + ":";
				}
				if(s != 0){
					resultS =  add0(s);
				}
				dateTime = resultH + resultM + resultS;
				o.next().html(dateTime);
				return dateTime;
			}
			abc.ondurationchange= function () {
				return secondToDate(abc.duration);
			}
			return dateTime;
		}
		
        //催收记录列表
        function dd() {
			$("#cRecord").gridView({
				url:"cuijimanage/findAllLog.do?callLoanNid="+"${callLoanInfo.callLoanNid}",
				colModel:[
					setColumn('催收添加时间','createTimeStr'),
					setColumn('催收对象姓名','toRealName'),
                    setColumn('催收联系人姓名','linkManName',{
                        formatter:function(cellvalue, options, rowObject){
                            return cellvalue  == null ? '': cellvalue;
                        }
                    }),
					setColumn('催收员','callUserName'),
					setColumn('催收方式','callTypeStr'),
					setColumn('催收关系','callShip',{
						formatter:function(cellvalue, options, rowObject){
							return $.dictionary('${callshipmap}').getByKey(cellvalue);
						}
					}),
					setColumn('联系方式','toMobile'),
					setColumn('催收结果','callResult'),
					setColumn('承诺还款日期','promiseRepaymentDay',{
						formatter:function(cellvalue, options, rowObject){
							return cellvalue  == null ? ''
                                : (new Date(cellvalue).toLocaleDateString()).replace(/\//g,"-");
						}
					}),
					setColumn('催收结果说明','callResultDesc',{width:250})
					]
			});
	}
	//短信通话列表
	function dd1(){
		$("#messageAndTell").gridView({
			url:"cuijimanage/getCallLoanConverseInfoList.do?callLoanNid="+"${callLoanInfo.callLoanNid}",
			colModel:[
				setColumn('操作日期','converseTime'),
				setColumn('方式','callTypeStr'),
				setColumn('对象','toRealNameType',{
                    formatter:function(cellvalue, options, rowObject){
                        return '${callLoanInfo.realName}';
                    }
                }),
				setColumn('催收员','callUserName'),
				setColumn('联系人','toRealName'),
				setColumn('联系电话','toMobile'),
				setColumn('内容','callInfo',{
					formatter:function(cellvalue, options, rowObject){
						var result = cellvalue;
						var callRecordFilePageIp = "http://"
							+  '${callRecordFilePageIp}'
							+ "/uncall_api/ccplay/play/player/index.php?files=";
						if(/mp3/.test(cellvalue)) {
							result = "<span audio=\'" + callRecordFilePageIp + cellvalue + "\'" +
								"style=\"color: blue;z-index: -1;cursor: pointer\">点击听取录音</span>";
						}
						return result;
					}
				}),
				setColumn('时长','',{
					formatter:function(cellvalue, options, rowObject){
						return cellvalue ? cellvalue : "";
					}
				}),
				setColumn('备注','remark'),
				setColumn('状态','status',{
					formatter:function(cellvalue, options, rowObject){
						return cellvalue == 0 ? "" : (cellvalue == 1 ? "待发送" : "已发送");
					}
				}),
				setColumn('操作','',{
					formatter:function(cellvalue, options, rowObject){
                        return '';
					}
				})
			],
			onCellSelect:function(rowid,iCol,cellcontent,e	){
				if(iCol == 7 && (/mp3/.test(cellcontent))){
					layer.open({
						type: 2,
						title: "录音",
						shade: [0],
						shadeClose:true,
						offset: 'b', //右下角弹出
						anim: 2,
						area:["436px"],
						content: [$(cellcontent).attr("audio"), 'no'] //iframe的url，no代表不显示滚动条
					});
				}
			},
			gridComplete:function(){
				var table = $(this);
                $.each(table.find("tr[role='row'] td[title='点击听取录音']"),function(i,v){
                	var o = $(v);
                	var audio = o.children().first().attr("audio");
                    getCallTime(audio.split("=")[1],$(v));
                });
			}
		});
	}
   //设备登录信息列表
	function dd3(){
		$.ajax({
			type: "get",
			 url: "cuijisecondtimes/getDeviceLoginInfo.do?userId="+"${callLoanInfo.userId}"+"&&flag="+"nei",
		  //  url: "cuijisecondtimes/getDeviceLoginInfo.do?userId=100511",
			async: true,
			success: function(data) {
				//总条数
				var z2 = data.length;
				var x2 = 0;
				var te2 = [];
				var pageSize=5;
				//计算总页数
				if(z2%pageSize==0){
					var y2 = parseInt(z2/pageSize);
				}else{
					var y2 = parseInt(z2/pageSize)+1;
				}
				//在页面显示总页数
				$(".nu23").text(y2);

				for(var m = 0;m<y2;m++){
					var tb2 = "";
					for(var n=0;n<pageSize;n++){
						if(z2%pageSize!=0 && (m+1) == y2 && n == z2%pageSize){
							break;
						}
						tb2 +=
								'<tr>'+
								'<td>'  +(data[m*pageSize+n].createTime==null?"":new Date(data[m*pageSize+n].createTime).toLocaleString())+'</td>'+
								'<td>' +(data[m*pageSize+n].lbs==null?"":data[m*pageSize+n].lbs)+'</td>'+
								'<td>' +(data[m*pageSize+n].ip==null?"":data[m*pageSize+n].ip)+'</td>'+
								'<td>' +(data[m*pageSize+n].deviceInfo==null?"":data[m*pageSize+n].deviceInfo)+'</td>'+
								'<td>' +(data[m*pageSize+n].deviceCode==null?"":data[m*pageSize+n].deviceCode)+'</td>'+
								'<td>' +(data[m*pageSize+n].wifiMac==null?"":data[m*pageSize+n].wifiMac)+'</td>'+
                                '<td>' +(data[m*pageSize+n].mobile==null?"":data[m*pageSize+n].mobile)+'</td>'+
								'</tr>';
					}
					te2[x2]=tb2;
					x2++;
				}
				$('#table3').append(te2[0])
				var q2 = 1;
				$("#pre3").on("click",function(){
					if(q2 > 1){
						$(".tt23").show().siblings().remove()
						q2--;
						$(".num23").text(q2);
						$('#table3').append(te2[q2-1])
					}
				})
				$("#next3").on("click",function(){
					if(q2 < m){
						$(".tt23").show().siblings().remove()
						q2++;
						$(".num23").text(q2);
						$('#table3').append(te2[q2-1])
					}
				})
				$("#first3").on("click",function(){
					$(".tt23").show().siblings().remove()
					q2=1;
					$(".num23").text(q2);
					$('#table3').append(te2[q2-1])
				})
				$("#end3").on("click",function(){
					$(".tt23").show().siblings().remove()
					q2=y2;
					$(".num23").text(q2);
					$('#table3').append(te2[q2-1])

				})
			}

		});
	}
  //最近三天通话记录列表
	function dd4(){
		$.ajax({
			type: "get",
			url: "cuijisecondtimes/getLast3daysCallRecord.do?userId="+"${callLoanInfo.userId}",
		   // url: "cuijisecondtimes/getLast3daysCallRecord.do?userId="+"100101",
			async: true,
			success: function(data) {
				//总条数
				var z2 = data.length;
				var x2 = 0;
				var te2 = [];
				var pageSize=5;
				//计算总页数
				if(z2%pageSize==0){
					var y2 = parseInt(z2/pageSize);
				}else{
					var y2 = parseInt(z2/pageSize)+1;
				}
				//在页面显示总页数
				$(".nu24").text(y2);

				for(var m = 0;m<y2;m++){
					var tb2 = "";
					for(var n=0;n<pageSize;n++){
						if(z2%pageSize!=0 && (m+1) == y2 && n == z2%pageSize){
							break;
						}
						var talkTime = new Date(data[m*pageSize+n].talkTime).toLocaleString();
						tb2 +=
								'<tr>'+
								'<td>'  +(data[m*pageSize+n].contUserName==null?"":data[m*pageSize+n].contUserName) +'</td>'+ //联系人名字
								'<td>' +data[m*pageSize+n].contMobile+'</td>'+ //联系人电话
								'<td>' +data[m*pageSize+n].type+'</td>'+ //通话次数
								'<td>' +(data[m*pageSize+n].mobileAddress==null?"":data[m*pageSize+n].mobileAddress) +'</td>'+ //地址
								'<td>' + talkTime +'</td>'+ //最后一次通话时间
								'</tr>';
					}
					te2[x2]=tb2;
					x2++;
				}
				$('#table4').append(te2[0])
				var q2 = 1;
				$("#pre4").on("click",function(){
					if(q2 > 1){
						$(".tt24").show().siblings().remove()
						q2--;
						$(".num24").text(q2);
						$('#table4').append(te2[q2-1])
					}
				})
				$("#next4").on("click",function(){
					if(q2 < m){
						$(".tt24").show().siblings().remove()
						q2++;
						$(".num24").text(q2);
						$('#table4').append(te2[q2-1])
					}
				})
				$("#first4").on("click",function(){
					$(".tt24").show().siblings().remove()
					q2=1;
					$(".num24").text(q2);
					$('#table4').append(te2[q2-1])
				})
				$("#end4").on("click",function(){
					$(".tt24").show().siblings().remove()
					q2=y2;
					$(".num24").text(q2);
					$('#table4').append(te2[q2-1])

				})
			}

		});
	}
   //历史逾期案件列表
	function dd5(){
		$.ajax({
			type: "get",
			url: "cuijisecondtimes/gethisoverduebillinfo.do?userId="+"${callLoanInfo.userId}"+"&callLoanNid="+"${callLoanInfo.callLoanNid}",
			async: true,
			success: function(data) {
				//总条数
				var z2 = data.length;
				var x2 = 0;
				var te2 = [];
				var pageSize=5;
				//计算总页数
				if(z2%pageSize==0){
					var y2 = parseInt(z2/pageSize);
				}else{
					var y2 = parseInt(z2/pageSize)+1;
				}
				//在页面显示总页数
				$(".nu25").text(y2);

				for(var m = 0;m<y2;m++){
					var tb2 = "";
					for(var n=0;n<pageSize;n++){
						if(z2%pageSize!=0 && (m+1) == y2 && n == z2%pageSize){
							break;
						}
						var status = data[m*pageSize+n].status;
						var jieantime = new Date(data[m*pageSize+n].endCaseDate).toLocaleString();
						if(status==2 || status==4){
							status="<font color='green'>是</font>"

						}else{
							status="<font color='red'>否</font>"
							jieantime="";
						}
						tb2 +=
								'<tr>'+
								'<td>'  +data[m*pageSize+n].callLoanNid +'</td>'+
                                '<td>'  +data[m*pageSize+n].productName +'</td>'+
								'<td>' +data[m*pageSize+n].borrowNid+'</td>'+
								'<td>' +data[m*pageSize+n].repaymentId+'</td>'+
								'<td>'+ new Date(data[m*pageSize+n].recoverTime*1000).toLocaleDateString()+ '</td>'+
								'<td>' +(data[m*pageSize+n].overdueAmount==null?"0.00":data[m*pageSize+n].overdueAmount.toFixed(2))+'</td>'+
								'<td>' +(data[m*pageSize+n].overdueFee==null?"0.00":data[m*pageSize+n].overdueFee.toFixed(2))+'</td>'+
								'<td>' +(data[m*pageSize+n].actualRecoverAmount==null?"0.00":data[m*pageSize+n].actualRecoverAmount.toFixed(2))+'</td>'+
								'<td>' +(data[m*pageSize+n].remainAccount==null?"0.00":data[m*pageSize+n].remainAccount.toFixed(2))+'</td>'+
								'<td>' +status+'</td>'+
								'<td>' +jieantime +'</td>'+
								'</tr>';
					}
					te2[x2]=tb2;
					x2++;
				}
				$('#table5').append(te2[0])
				var q2 = 1;
				$("#pre5").on("click",function(){
					if(q2 > 1){
						$(".tt25").show().siblings().remove()
						q2--;
						$(".num25").text(q2);
						$('#table5').append(te2[q2-1])
					}
				})
				$("#next5").on("click",function(){
					if(q2 < m){
						$(".tt25").show().siblings().remove()
						q2++;
						$(".num25").text(q2);
						$('#table5').append(te2[q2-1])
					}
				})
				$("#first5").on("click",function(){
					$(".tt25").show().siblings().remove()
					q2=1;
					$(".num25").text(q2);
					$('#table5').append(te2[q2-1])
				})
				$("#end5").on("click",function(){
					$(".tt25").show().siblings().remove()
					q2=y2;
					$(".num25").text(q2);
					$('#table5').append(te2[q2-1])

				})
			}

		});
	}
	function addLinkMan(userid){
		var anjianstatus = "${callLoanInfo.status}"
		if(anjianstatus==0){
			sweetAlert("待催收案件不能添加!");
		}else {
			var options = {
				title: "添加联系人",
				url: "cuijimanage/callectionAdd.do?userId=" + userid
			};
			openDialog(options);
		}
	}
   function updateLinkMan(userid,id){
	   var anjianstatus = "${callLoanInfo.status}"
	   if(anjianstatus==0){
		   sweetAlert("待催收案件不能操作!");
	   }else {
		   var options = {
			   title: "修改联系人",
			   url: "cuijimanage/contactInfoUpdatePage.do?userId=" + userid + "&id=" + id
		   };
		   openDialog(options);
	   }
   }
	function deleteLinkMan(id){
		var anjianstatus = "${callLoanInfo.status}"
		if(anjianstatus==0){
			sweetAlert("待催收案件不能操作!");
		}else {
			layer.confirm('你确定要删除该联系人？', {
				btn: ['确定', '保留'] //按钮
			}, function () {
				$.ajax({
					type: "POST",
					dataType: "json",
					url: "cuijimanage/delcontactsInfo.do",
					data: {id: id},
					success: function (data) {
						if (data.num == 1) {
                            layer.msg('删除成功', {
                                icon: 1
                            });
							 dd0();
						}
					},
				});
			}, function () {
				layer.msg('保留', {
					icon: 6
				});
			});
		}
	}
	function addCuishouRecord(id,mtype,vicename,vicephone){
        console.log("进入添加催收记录")
		var anjianstatus = "${callLoanInfo.status}"
		var calluser = "${callLoanInfo.callUser}"
		console.log("calluser:"+calluser);
		if(anjianstatus==0){
			sweetAlert("待催收案件不能添加!");
		}else if(calluser==""){
			console.log("calluser:"+calluser);
			sweetAlert("没有催收员案件不能添加!");
		} else{
            if(!id){
                id=0
            }
            if(!mtype){
                mtype=null
            }
            //下面if代码是为了在通讯录中添加催计消息,掩码后催计图标消失
          if(!vicename){
              vicename=null
          }
          if(!vicephone){
              vicephone=0
          }
		var options =  {
		title:"添加催收记录",
		url: "cuijimanage/addCuishouRecorde.do?callLoanNid="+"${callLoanInfo.callLoanNid}"+"&callUser="+"${callLoanInfo.callUser}"+"&linkManId="+id+"&mtype="+mtype+"&vicename="+vicename+"&vicephone="+vicephone
	  };
	  openDialog(options);
		}
	}
	function toMessage(id,tellPhone,tellPhoneShow,callUser){
		var anjianstatus = "${callLoanInfo.status}"
		var calluser = "${callLoanInfo.callUser}"
		if(anjianstatus==0){
			sweetAlert("待催收案件不能发短信!");
		}else if(calluser=="") {
			console.log("calluser:"+calluser);
			sweetAlert("没有催收员案件不能发短信!");
		}else{
		var options =  {
			title:"短信发送操作",
			url: "cuijimanage/toMessage.do?id="+id+"&tellPhone="+tellPhone+"&tellPhoneShow="+tellPhoneShow+"&callUser="+callUser+"&callLoanNid="+"${callLoanInfo.callLoanNid}"
		};
            openDialog2(options);
		}
	}
	function toMessage1(tellPhone,tellPhoneShow,realName){
		var anjianstatus = "${callLoanInfo.status}"
		var calluser = "${callLoanInfo.callUser}"
		if(anjianstatus==0){
			sweetAlert("待催收案件不能发短信!");
		}else if(calluser=="") {
			console.log("calluser:"+calluser);
			sweetAlert("没有催收员案件不能发短信!");
		}else{
		var options =  {
			title:"短信发送操作",
			url: "cuijimanage/toMessage1.do?tellPhone="+tellPhone+"&tellPhoneShow="+tellPhoneShow+"&realName="+realName+"&callLoanNid="+"${callLoanInfo.callLoanNid}"+"&callUser="+"${callLoanInfo.callUser}"
		};
            openDialog2(options);
		}
	}
	function toHuankuanDesc(userId,repaymentId){
		var options1 =  {
			title:"还款信息",
			//url: "cuijimanage/toHuankuanDesc.do?userId="+userId+"&repaymentId="+repaymentId+"&faxi="+"${callLoanInfo.overdueFee}"
            url: "cuijimanage/toHuankuanDesc.do?userId="+userId+"&repaymentId="+repaymentId+"&callLoanNid="+"${callLoanInfo.callLoanNid}"
		};
		openDialog1(options1);
	}
	function toyinghuanDesc(){
		layer.open({
			type: 1,
			skin: 'layui-layer-rim', //加上边框
			area: ['500px', '300px'], //宽高
			content: "<div>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还总额：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.acountWait}'  pattern="#,###.##"/> "+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还本金：&nbsp;&nbsp;&nbsp;&nbsp;"+"${mao.receiveCapitalWait}"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还利息：&nbsp;&nbsp;&nbsp;&nbsp;"+"${mao.interestReceiveWait}"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还平台服务费：&nbsp;&nbsp;&nbsp;&nbsp;"+ "${mao.serviceFeeWait}"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还借款管理费：&nbsp;&nbsp;&nbsp;&nbsp;"+"${mao.borrowFeeWait}"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "罚息：&nbsp;&nbsp;&nbsp;&nbsp;"+"${mao.overdueFee}"+"</span><br>"+
			"</div>"
		});
	}
	function toVeiHuanDesc(){

		var weihuanjine =  ${mao.principalReceveWait<500?mao.principalReceveWait+mao.borrowFeeWait+mao.serviceFeeWait+callLoanInfo.overdueFee-mao.receveAmountYes-mao.receveBorrowFee-mao.receveServiceFee-mao.receveOverdueFee:mao.principalReceveWait+mao.borrowFeeWait+mao.serviceFeeWait+callLoanInfo.overdueFee-mao.receveAmountYes-mao.receveBorrowFee-mao.serviceFeeWait-mao.receveOverdueFee}
		var weihuanjine1 = parseFloat(weihuanjine).toFixed(2);
		//未还本金
		var weihuanbenjin ="${mao.receiveCapitalWait-mao.receveCaptialYes}"
		var weihuanbenjin1 = parseFloat(weihuanbenjin).toFixed(2);
		//未还利息
		var weihuanlixi =  "${mao.interestReceiveWait-mao.receveInterestYes}"
		var weihuanlixi1 = parseFloat(weihuanlixi).toFixed(2);
		layer.open({
			type: 1,
			skin: 'layui-layer-rim', //加上边框
			area: ['500px', '300px'], //宽高
			content: "<div>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未还总额：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.acountRemain}'  pattern="#,###.##"/>"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未还本金：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.receiveCapitalWait-mao.receveCaptialYes}'  pattern="#,###.##"/>"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未还利息：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.interestReceiveWait-mao.receveInterestYes}'  pattern="#,###.##"/>"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未还平台服务费：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.remainServiceFee}'  pattern="#,###.##"/>"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未还借款管理费：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.remainBorrowFee}'  pattern="#,###.##"/>"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未还罚息：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.remainOverdueFee}'  pattern="#,###.##"/>"+"</span><br>"+
			"</div>"
		});
	}
	function toRemainYinghuanDesc(){//应还总额
        layer.open({
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: ['500px', '300px'], //宽高
            content: "<div>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "待还本金：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.receiveCapitalWait-mao.receveCaptialYes}'  pattern="#,###.##"/>"+"</span><br>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "待还利息：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.interestReceiveWait-mao.receveInterestYes}'  pattern="#,###.##"/>"+"</span><br>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "待还罚息：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.remainOverdueFee}'  pattern="#,###.##"/>"+"</span><br>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "待还借款管理费：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${discMap.remainBorrowFee}'  pattern="#,###.##"/>"+"</span><br>"+
            "</div>"
        });
    }
    function toqianzong(){//欠款总额
        layer.open({
            type: 1,
            skin: 'layui-layer-rim', //加上边框
            area: ['500px', '300px'], //宽高
            content: "<div>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还本金：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.receiveCapitalWait }'  pattern="#,###.##"/>"+"</span><br>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还利息：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.interestReceiveWait}'  pattern="#,###.##"/>"+"</span><br>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还罚息：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.overdueFee}'  pattern="#,###.##"/>"+"</span><br>"+
            "&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "应还借款管理费：&nbsp;&nbsp;&nbsp;&nbsp;"+"<fmt:formatNumber value='${mao.borrowFeeWait}'  pattern="#,###.##"/>"+"</span><br>"+
            "</div>"
        });
    }
	function toJianMianDesc(){
		layer.open({
			type: 1,
			skin: 'layui-layer-rim', //加上边框
			area: ['500px', '300px'], //宽高
			content: "<div>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "未使用：&nbsp;&nbsp;&nbsp;&nbsp;"+"${faxiMap.weishiyong}"+"</span><br>"+
			"&nbsp;&nbsp;&nbsp;&nbsp;<span>"+ "已使用：&nbsp;&nbsp;&nbsp;&nbsp;"+"${faxiMap.yishiyong+faxiMap.faxituihui}"+"</span><br>"+
			"</div>"
		});
	}
	//打开催收记录，联系人界面
        function openDialog(options) {
            var defaultOptions = {
                title: "",
                url: "",
                callBack: function () {
                }
            };
            options = $.extend(defaultOptions, options);

            layer.open({
                title: options.title,
                fixed: false,
                type: 2,
                anim: 4,
                content: options.url,
                area: ['450px', '450px'],
                end: function () {
                    dd0()
                    $("#cRecord").refreshGridView();
                }
            })
        }
	//打开还款详情弹出框
	function openDialog1(options) {
		var defaultOptions = {
			title: "",
			url: "",
			callBack: function () {
			}
		};
		options = $.extend(defaultOptions, options);

		layer.open({
			title: options.title,
			fixed: false,
			type: 2,
            anim: 4,
			content: options.url,
			area: ['450px', '350px'],
			end: options.callBack
		})
	}
        //打开发短信界面
        function openDialog2(options) {
            var defaultOptions = {
                title: "",
                url: "",
                callBack: function () {
                }
            };
            options = $.extend(defaultOptions, options);

            layer.open({
                title: options.title,
                fixed: false,
                type: 2,
                anim: 4,
                content: options.url,
                area: ['550px', '500px'],
                end: function () {
                    $("#messageAndTell").refreshGridView();
                }
            })
        }

  </script>
</head>
<body>
<br>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
	<ul class="layui-tab-title">
		<li class="layui-this">催收详情</li>
		<li>其他关联信息</li>
		<li>身份证照片</li>
		<li>任务流转记录</li>
	</ul>
<c:if test="${callLoanInfo.status eq 1}">
	<div style="float: right;position: relative; top: -40px;display: block;" >
		<button id="heimingdan" onclick="toBlackList('${callLoanInfo.callLoanNid}','${callLoanInfo.realName}','${callLoanInfo.contIdCard}','${callLoanUserInfo.mobile}','${callLoanInfo.productName}','${callLoanInfo.repaymentId}','${callLoanInfo.productSource}','${callLoanInfo.userId}','${callLoanInfo.callUser}')" class="btn btn-primary" >提交黑名单</button>
		<button id="fanqizha" onclick="toAntiFraud('${callLoanInfo.callLoanNid}','${callLoanInfo.borrowNid}','${callLoanInfo.realName}','${callLoanUserInfo.mobile}','${callLoanInfo.productSource}','${callLoanInfo.contIdCard}')"  class="btn btn-primary" style="margin:0 10px 0 15px; ">提交反欺诈</button>
	</div>
</c:if>
	<div class="layui-tab-content" style="height: 100px;">
		<div class="layui-tab-item layui-show">
<div style="width: 100%;">
  <table width="90%" border="0px" bordercolor="gainsboro" style="margin-left: 50px;" >
	<tr height="35px" >
	  <td>催收编号：</td><td> ${callLoanInfo.callLoanNid}</td>
	  <td>借款编号：</td><td>${callLoanInfo.borrowNid}</td>
	  <td>借款人姓名：</td><td>${callLoanInfo.realName}</td>
	  <td>欠款总额：</td><td width="140px">
        <fmt:formatNumber value="${mao.receiveCapitalWait+mao.interestReceiveWait+mao.overdueFee+mao.borrowFeeWait}" pattern="#,#00.00#"/>
        &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toqianzong()" style="color: #43a0ff" >
        详情 </a>
    </td>

    </tr>
    <tr height="35px" >
      <td>身份证号：</td><td>${callLoanInfo.contIdCard}</td>
      <td>邮箱账号：</td><td>${callLoanUserInfo.userEmail} </td>
      <td>籍贯：</td><td>${callLoanUserInfo.address} </td>
      <td>已还金额：</td><td><%--<fmt:formatNumber value="3999" type="currency"/>--%>
        <fmt:formatNumber value="${mao.receveCaptialYes+mao.receveInterestYes+mao.receveOverdueFee+mao.receveBorrowFee-faxiMap.faxituihui}" pattern="#,#00.00#"/>
        &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toHuankuanDesc('${callLoanInfo.userId}','${callLoanInfo.repaymentId}')" style="color: #43a0ff" >
            详情 </a>
    </td>
    </tr>
    <tr height="35px">
      <td>联系方式：</td><td>
         <c:if test="${!empty callLoanUserInfo.mobile}">
        <span><span> ${callLoanUserInfo.mobile}</span>
            &nbsp;&nbsp;<img src="static/images/icon-a.png" callLoanNid="${callLoanInfo.callLoanNid}" mType="mobile" anjianUserId="${userId}" borrowNid="top" anjianstauts="${callLoanInfo.status}" call>
             <a href="javascript:void(-1);" style="color: blue"onclick="toMessage1('${callLoanUserInfo.mobile}','${callLoanUserInfo.mobileShow}','${callLoanInfo.realName}')">
                <img src="static/images/icon-b.png"></a>
        <a href="javascript:void(-1);" style="color: blue"onclick="addCuishouRecord(123,'m4')"><img src="static/images/icon5.png" height="17px" width="17px"></a>
        </span>
         </c:if>
    </td>
      <td>学历：</td><td>${callLoanUserInfo.education} </td>
      <td>毕业院校：</td><td></td>
      <td>剩余应还：</td>
        <td>
            <fmt:formatNumber value="${mao.receiveCapitalWait-mao.receveCaptialYes+mao.interestReceiveWait-mao.receveInterestYes+discMap.remainOverdueFee+discMap.remainBorrowFee}" pattern="#,#00.00#"/>
            &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toRemainYinghuanDesc()" style="color: #43a0ff" >
            详情 </a>
        </td>
    </tr>
    <tr height="35px">

      <td>户籍所在地：</td><td>${callLoanUserInfo.addressHK}</td>
      <td>现居住地：</td><td> ${callLoanUserInfo.addressCZ}</td>
      <td>借款产品：</td><td>${callLoanInfo.productName}</td>
      <td>账户余额：</td>
      <td>
      <fmt:formatNumber value="${amountMap.availableCredit-0}" pattern="#,#00.00#"/>
      </td>
    </tr>
      <tr height="35px">
          <td>引流渠道：</td><td>
              <c:choose>
                  <c:when test="${discMap.userChannel eq '0'}">
                      正常注册
                  </c:when>
                  <c:when test="${discMap.userChannel eq '1'}">
                      内勤推荐
                  </c:when>
                  <c:when test="${discMap.userChannel eq '2'}">
                      外勤推荐
                  </c:when>
                  <c:when test="${discMap.userChannel eq '3'}">
                      BD
                  </c:when>
                  <c:when test="${discMap.userChannel eq '4'}">
                      多盟
                  </c:when>
                  <c:when test="${discMap.userChannel eq '39'}">
                     R360
                  </c:when>
                  <c:when test="${discMap.userChannel eq '41'}">
                     消费贷
                  </c:when>
                  <c:when test="${discMap.userChannel eq '45'}">
                                融360游戏贷
                  </c:when>
                  <c:otherwise>
                     未识别的渠道--> ${discMap.userChannel}
                  </c:otherwise>
              </c:choose>
      </td>
          <td>性别：</td>
          <td>${callLoanUserInfo.sex}</td>
          <td>单位名称：</td>
          <td>${callLoanUserInfo.comName}</td>
          <td>单位电话：</td>
          <td>
           <%-- <c:if test="${!empty callLoanUserInfo.comTel}">
                  ${callLoanUserInfo.comTel}&nbsp;
                  <img src="static/images/icon-a.png" callLoanNid="${callLoanInfo.callLoanNid}" mType="mobile"
                       anjianUserId="${userId}" borrowNid="topC" anjianstauts="${callLoanInfo.status}" call>
            </c:if>--%>
              <c:if test="${!empty callLoanUserInfo.comTel}">
             <span><span> ${callLoanUserInfo.comTel}</span>
             &nbsp;&nbsp;<img src="static/images/icon-a.png" callLoanNid="${callLoanInfo.callLoanNid}" mType="mobile" anjianUserId="${userId}" borrowNid="topC" anjianstauts="${callLoanInfo.status}" call>
                <span> <a href="javascript:void(-1);" style="color: blue"onclick="addCuishouRecord('-123','m4')"><img src="static/images/icon5.png" height="17px" width="17px"></a></span>
                                </span>
              </c:if>
          </td>
      </tr>
  </table>
</div>

            <div style="margin: 20px;padding: 10px;border: 1px; height: 220px;width: 100%;">
                <table border="0"  style="float: left;margin-left: 2%;" class="table-info">
                    <tr height="35px" align="center">
                        <td width="100px">借款金额</td><%--${discMap.borrowAmount}--%>
                        <td width="140px"><fmt:formatNumber value="${discMap.borrowAmount}" pattern="#,###.##" /></td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>审批金额</td>
                        <td>${discMap.borrowAnswerAmount}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>合同金额</td>
                        <td></td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>借款利率(%)</td>
                        <td> ${discMap.rate}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>借款期限</td>
                        <td > ${discMap.duration }
                            <c:if test="${discMap.durationType==1}">天</c:if>
                            <c:if test="${discMap.durationType==2}">周</c:if>
                            <c:if test="${discMap.durationType==3}">月</c:if>
                            <c:if test="${discMap.durationType==4}">年</c:if>
                        </td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>还款方式</td>
                        <td >
                            <c:if test="${discMap.repaymentType==1}">等额本息</c:if>
                            <c:if test="${discMap.repaymentType==2}">一次性还本付息</c:if>
                            <c:if test="${discMap.repaymentType==3}">按月付息分期还本</c:if>
                            <c:if test="${discMap.repaymentType==4}">按季付息分期还本</c:if>
                            <c:if test="${discMap.repaymentType==5}">一次性付息到期还本</c:if>
                        </td>
                    </tr>
                </table>
                <table border="0"  style="float: left;margin-left: 2%;" class="table-info">
                    <tr height="35px" align="center">
                        <td width="110">绑定银行卡</td>
                        <td width="180"> ${callLoanUserInfo.toAccNo}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>所属银行</td>
                        <td> ${callLoanUserInfo.toBankName}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>所在省份</td>
                        <td> ${callLoanUserInfo.toProName}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>所在市区</td>
                        <td>${callLoanUserInfo.toCityName}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>银行卡类型</td>
                        <td>
                            <c:if test="${callLoanUserInfo.bankType==1}">借记卡</c:if>
                            <c:if test="${callLoanUserInfo.bankType==2}">信用卡</c:if>
                        </td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>预留手机号</td>
                        <td>${callLoanUserInfo.mobileBank}</td>
                    </tr>
                </table>
                <table border="0" style="float: left;margin-left: 2%;" class="table-info">
                    <tr height="35px" align="center">
                        <td width="110px">放款金额</td>
                        <td width="180px">${discMap.actualAmount}</td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>放款到账时间</td>
                        <td><fmt:formatDate value="${discMap.addTime}" pattern="yyyy-MM-dd  HH:mm:ss"/></td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>提现时间</td>
                        <td><fmt:formatDate value="${discMap.withdrawDay}" pattern="yyyy-MM-dd  HH:mm:ss"/></td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>提现到账时间</td>
                        <td><fmt:formatDate value="${discMap.withdrawSuccday}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>该账单应还时间</td>
                        <td>
                            <fmt:formatDate value="${mao.recoverTime}" pattern="yyyy-MM-dd"/>
                        </td>
                    </tr>
                </table>
                <table border="0" style="float: left;margin-left: 2%;" class="table-info">
                    <tr height="35px" align="center">
                        <td width="110px">还款期数</td>
                        <td width="180px">${callLoanInfo.period}/${callLoanInfo.periodTotal}</td>
                    </tr>
                 <%--   <tr height="35px" align="center">
                        <td>应还总额</td>
                        <td>
                            <fmt:formatNumber value="${discMap.acountWait}" pattern="#,###.##" /> &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toyinghuanDesc()" style="color: #43a0ff">
                            详情 </a>
                        </td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>已还总额</td>
                        &lt;%&ndash; <td><fmt:formatNumber value="${mao.receveAmountYes<500?mao.receveAmountYes+mao.receveBorrowFee+mao.receveServiceFee+mao.receveOverdueFee:mao.receveAmountYes+mao.receveBorrowFee+mao.receveOverdueFee}" pattern="#,###.##" /> &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toHuankuanDesc('${callLoanInfo.userId}','${callLoanInfo.borrowNid}')" style="color: #43a0ff">
                             详情 </a>
                         </td>&ndash;%&gt;
                        <td><fmt:formatNumber value="${mao.acountYet}" pattern="#,###.##" /> &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toHuankuanDesc('${callLoanInfo.userId}','${callLoanInfo.repaymentId}')" style="color: #43a0ff">
                            详情 </a>
                        </td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>未还金额</td>
                        &lt;%&ndash; <td><fmt:formatNumber value="${mao.principalReceveWait<500?mao.principalReceveWait+mao.borrowFeeWait+mao.serviceFeeWait+callLoanInfo.overdueFee-mao.receveAmountYes-mao.receveBorrowFee-mao.receveServiceFee-mao.receveOverdueFee:mao.principalReceveWait+mao.borrowFeeWait+mao.serviceFeeWait+callLoanInfo.overdueFee-mao.receveAmountYes-mao.receveBorrowFee-mao.serviceFeeWait-mao.receveOverdueFee}" pattern="#,###.##" />
                           &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toVeiHuanDesc()" style="color: #43a0ff" >
                             详情 </a>
                         </td>&ndash;%&gt;
                        <td><fmt:formatNumber value="${discMap.acountRemain}" pattern="#,###.##" />
                            &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toVeiHuanDesc()" style="color: #43a0ff" >
                                详情 </a>
                        </td>
                    </tr>--%>
                    <tr height="35px" align="center">
                        <td>减免金额总和</td>
                        <td> ${faxiMap.faxizonge==null?0:faxiMap.faxizonge}  &nbsp;&nbsp; <a href="javascript:void(-1);" onclick="toJianMianDesc()" style="color: #43a0ff" >
                            详情 </a></td>
                    </tr>
                    <tr height="35px" align="center">
                        <td>逾期天数</td>
                        <td>${callLoanInfo.overdueDate}</td>
                    </tr>
                </table>
            </div>
            <br><br>
            <div id="linkManlist">

            </div>

            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <button class="btn btn-primary" type="button" onclick = "addLinkMan('${callLoanInfo.userId}')">新增联系人</button>

            <hr style ="height:1px;border:none;border-top:1px groove gainsboro;"/>
            <H5 style="margin-left: 40px;" class="title-show">催收记录</H5>
            <div id="cRecord" style="margin-left: 40px;width: 90%" >
                <table id="cr"></table>
                <div id="cr_jqGridPager">
                </div>
            </div>
            <div align="left" style="float:left;top:-45px;position:relative;margin-left:10px">
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <button class="btn btn-primary" type="button" onclick = "addCuishouRecord()">添加催收记录</button>
            </div>
            <br> <br>
            <hr style ="height:1px;border:none;border-top:1px groove gainsboro;"/>
            <H5 style="margin-left: 40px;" class="title-show">短信通话列表</H5>
            <div id="messageAndTell" style="margin-left: 40px;width: 90%">
                <table id="abc"></table>
                <div id="jqGridPager"></div>
            </div>
            <br> <br>
        </div>
        <div class="layui-tab-item">
            <div style="margin: 20px;padding: 10px;border: 1px;height: 800px;width: 1850px;">
                <table  class="table table-hover dataTable" border="1px" bordercolor="#deefff" style="float: left;margin-left: 10px;width: 560px;">
                    <thead>
                    <tr height="45px" align="center">
                        <td width="18%" style="position: relative" class="star-tips">通讯录姓名</td>
                        <td width="26%">通话记录top20</td>
                        <td width="15%">通话次数</td>
                        <td width="12%">地区</td>
                        <td width="30%">最后通话时间</td>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach  var="callRecord" varStatus="var"  items="${callRecordList}">
                        <tr style="height:37px">
                            <td>${callRecord.contUserName}</td><!-- 联系人姓名 -->
                            <td>${callRecord.contMobile}
                                <c:if test="${!empty callRecord.contMobile && !isCover}">
                                <img src="static/images/icon-a.png"
                                                              anjianUserId="${userId}"
                                                              userName="${callRecord.contUserName}"
                                                              recordMobile="${callRecord.contMobile}"
                                                              callLoanNid="${callLoanInfo.callLoanNid}"
                                                              borrowNid="book" anjianstauts="${callLoanInfo.status}"	
                                                              call>
                                    <a href="javascript:void(-1);" style="color: blue"onclick="addCuishouRecord(123,'m100','${callRecord.contUserName}','${callRecord.contMobile}')"><img src="static/images/icon5.png" height="17px" width="17px"></a>
                                </c:if>
                            </td><!-- 联系人电话 -->
                            <td>${callRecord.type}</td><!-- 通话次数 -->
                            <td>
                                <c:if test ="${ not empty callRecord.contMobile and not empty callRecord.mobileAddress}">
                                    ${callRecord.mobileAddress}
                                </c:if>
                                <c:if test ="${not empty callRecord.contMobile  and empty callRecord.mobileAddress}">
                                    <a href="javascript:void(0)" onclick="$(this).getMobileAddr(1,'${callRecord.contMobile}')"
                                       style="color: blue">
                                        查询
                                    </a>
                                </c:if>
                            </td>
                            <td>
                                <fmt:formatDate value="${callRecord.talkTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                            </td><!-- 通话开始时间 -->
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
                <table  class="table table-hover dataTable"  border="1px" bordercolor="#deefff "style="float: left;margin-left: 25px;width: 520px;">
                    <thead>
                    <tr height="45px" align="center">
                        <td width="22%">通讯录姓名</td>
                        <td width="22%">短信次数top20</td>
                        <td width="15%">通话次数</td>
                        <td width="12%">地区</td>
                        <td width="29%">最后通话时间</td>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach begin="0" end="19" step="1">
                        <tr style="height:37px">
                            <td align="center"> </td>
                            <td align="center"> </td>
                            <td align="center"> </td>
                            <td align="center"> </td>
                            <td align="center"> </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
                <div  style="float: left;margin-left: 15px;height: 782px;width: 570px;overflow: auto">
                    <div class="layui-row" id="callBook" style="height: 1%;position:relative;">
                        <table id="callBookList"></table>
                        <div id="callBookPage"></div>
                    </div>
                </div>
            </div>
            <hr style ="height:1px;border:none;border-top:1px groove ghostwhite;">
            <H5 style="margin-left: 40px;margin-bottom: 5px;" class="title-show">登录信息</H5>
            <div class="tj" style="margin-left: 40px;width:1700px;">
                <table  id="table3" class="tjTab tb2 table table-hover" border="0">
                    <tr class="tt23" style="background: #43a0ff;color:#FFFFFF;">
                        <td width="10%">登录时间</td>
                        <td width="15%">LBS地址</td>
                        <td width="20%">IP地址</td>
                        <td width="10%">设备型号</td>
                        <td width="20%">设备号</td>
                        <td width="15%">WIFI-MAC</td>
                        <td width="10%">本机号码</td>
                    </tr>
                </table>
            </div>
            <div align="right" style="float:right;margin-right: 200px;margin-bottom: 10px" >
                <button id="first3" class="btn btn-primary" >首 页</button>
                <button id="pre3" class="btn btn-primary" >上一页</button>
                <span class="num23">1</span><span>/</span><span class="nu23">1</span>
                <button id="next3"class="btn btn-primary" >下一页</button>
                <button id="end3" class="btn btn-primary">尾页</button>
            </div>
            <hr style ="height:1px;border:none;border-top:1px groove   ghostwhite;">
            <H5 style="margin-left: 40px;margin-bottom: 5px;" class="title-show">最近三天通话记录</H5>
            <div class="tj"style="margin-left: 40px;width:1700px;">
                <table  id="table4" class="tjTab tb2 table table-hover" border="0">
                    <tr class="tt24" style="background: #43a0ff;color:#FFFFFF;">
                        <td width="20%">通讯录姓名</td>
                        <td width="20%">通话记录</td>
                        <td width="20%">通话次数</td>
                        <td width="20%">地区</td>
                        <td width="20%">通话时间</td>
                    </tr>
                </table>
            </div>
            <div align="right" style="float:right;margin-right: 200px;margin-bottom: 10px" >
                <button id="first4" class="btn btn-primary" >首 页</button>
                <button id="pre4" class="btn btn-primary" >上一页</button>
                <span class="num24">1</span><span>/</span><span class="nu24">1</span>
                <button id="next4"class="btn btn-primary" >下一页</button>
                <button id="end4" class="btn btn-primary">尾页</button>
            </div>
            <hr style ="height:1px;border:none;border-top:1px groove ghostwhite;">
            <H5 style="margin-left: 40px;margin-bottom: 5px;" class="title-show">历史逾期账单</H5>
            <div class="tj"style="margin-left: 40px;width:1700px;">
                <table  id="table5" class="tjTab tb2 table table-hover" border="0">
                    <tr class="tt25" style="background: #43a0ff;color:#FFFFFF;">
                        <td width="12%">催收编号</td>
                        <td width="12%">借款产品</td>
                        <td width="12%">借款编号</td>
                        <td width="10%">还款订单号</td>
                        <td width="9%">应还款时间</td>
                        <td width="7%">逾期金额</td>
                        <td width="7%">罚息金额</td>
                        <td width="7%">已还金额</td>
                        <td width="7%">未还金额</td>
                        <td width="7%">是否结案</td>
                        <td width="10%">结案时间</td>
                    </tr>
                </table>
            </div>
            <div align="right" style="float:right;margin-right: 200px;margin-bottom: 20px" >
                <button id="first5" class="btn btn-primary" >首 页</button>
                <button id="pre5" class="btn btn-primary" >上一页</button>
                <span class="num25">1</span><span>/</span><span class="nu25">1</span>
                <button id="next5"class="btn btn-primary" >下一页</button>
                <button id="end5" class="btn btn-primary">尾页</button>
            </div>
        </div>
        <div class="layui-tab-item">
            <div class="form-group col-sm-10">
                <div class="col-sm-1">

                </div>
                <div class="col-sm-5"  style="display:table-cell;font-size:18px;font-height:14px;vertical-align:middle;text-align:center">
                    <a target="_blank"href="cuijimanage/IoReadImage?userId=${callLoanInfo.userId}&type=z">
                        <img style="margin-left: 20px;margin-right: 50px;margin-top: 20px; height: 400px;width: 650px"
                             src="cuijimanage/IoReadImage?userId=${callLoanInfo.userId}&type=z"
                             onerror="javascript:this.src='static/img/gantan.jpg'"
                             alt="无图片显示" />
                    </a>
                    <br>
                    <br>
                    <span style="margin-top: 20px;">身份证正面</span>
                </div>
                <div class="col-sm-6"  style="display:table-cell;font-size:18px;font-height:14px;vertical-align:middle;text-align:center">
                    <a target="_blank" href="cuijimanage/IoReadImage?userId=${callLoanInfo.userId}&type=f">
                        <img style="margin-left: 150px;margin-top: 20px; height: 400px;width: 650px"
                             src="cuijimanage/IoReadImage?userId=${callLoanInfo.userId}&type=f"
                             onerror="javascript:this.src='static/img/gantan.jpg'"
                             alt="无图片显示"/>
                    </a>  <br>
                    <br>
                    <span style="margin-left: 250px;">身份证反面</span>
                </div>
            </div>
            <div class="form-group col-sm-10">
                <div class="col-sm-1">
                </div>
                <div class="col-sm-5" style="display:table-cell;font-size:18px;font-height:14px;vertical-align:middle;text-align:center">
                   <%-- <a target="_blank" href="cuijimanage/IoReadImage?userId=${callLoanInfo.userId}&type=h">
                        <img src="cuijimanage/IoReadImage?userId=${callLoanInfo.userId}&type=h" id="npcImg" width="650px" height="400px"/>
                    </a> <br>--%>
                       <a target="_blank" href="${UserIdCardInfoMap.image==null?"static/img/gantan.jpg":UserIdCardInfoMap.image}">
                           <img style="margin-left: 20px;margin-top: 20px; height: 400px;width: 650px"
                                src="${UserIdCardInfoMap.image}"
                                onerror="javascript:this.src='static/img/gantan.jpg'"
                                alt="无图片显示" />
                       </a> <br>
                    <span style="margin-top: 50px;">活体验证照片</span>
                </div>
            </div>
        </div>
        <div class="layui-tab-item">
            <div class="form-group col-sm-10">

                <%--<div style="float: left;margin: 20px;padding: 10px;border: 1px;background-color: ghostwhite ;height: 450px;width: 1200px;margin-left: 100px">--%>
                <div class="col-sm-1">

                </div>
                <div class="col-sm-7">
                    <br><br>
                    <table  class="table table-hover dataTable" border="3px" bordercolor="#000000" style="float: left;margin-left: 100px;width: 1200px;">
                        <thead>
                        <tr height="45px" align="center">
                            <td width="10%">逾期阶段</td>
                            <td width="10%">当前状态</td>
                            <td width="20%">流转情况</td>
                            <td width="25%">开始时间</td>
                            <td width="25%">结束时间</td>
                            <td width="10%">操作人</td>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach  var="transferHistory" varStatus="var"  items="${transferHistoryInfoList}">
                            <tr style="height:37px">
                                <td>${transferHistory.overdueStage}</td>
                                <td>
                                    <c:if test="${transferHistory.currentStatus==0}">待催收</c:if>
                                    <c:if test="${transferHistory.currentStatus==1}">催收中</c:if>
                                    <c:if test="${transferHistory.currentStatus==2}">已结案</c:if>
                                    <c:if test="${transferHistory.currentStatus==3}">委外催收中</c:if>
                                    <c:if test="${transferHistory.currentStatus==5}">委外待催收</c:if>
                                </td>
                                <td>${transferHistory.transferDesc}</td>
                                <td>
                                    <fmt:formatDate value="${transferHistory.startTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                                </td>
                                <td>
                                    <fmt:formatDate value="${transferHistory.endTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                                </td>
                                <td>${transferHistory.operatorName}</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <div class="col-sm-2">

                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" name="callresulttypen" value='${callresulttypen}'/>
<input type="hidden" name="ADMIN" value="${ADMIN}"/>
<input type="hidden" name="CSZZ" value="${CSZZ}"/>
<input type="hidden" name="CSJL" value="${CSJL}"/>
<input type="hidden" name="currentRoleID" value="${currentRoleID}"/>
<script>
	/**
     * 获取通讯录
	 */
	function getCallBook(){
		$("#callBook").gridList({
			url:"cuijimanage/getCallHisBookList/${userId}",
			colModel: [
				setColumn("通讯录姓名","contactsName",{width:150}),
				setColumn("通讯录","contactsMobile" ,{formatter:
						function(cellvalue, options, rowObject){
							var result = [];
							result.push("<span style='margin-right: 5px;'>" + cellvalue + "</span>");
							if(cellvalue && '${isCover}' == 'false'){
								result.push(
									'<a href="javascript:void(0)">' +
									'<img title="拨号" style="cursor:pointer;" src="static/images/icon-a.png"' +
									'anjianUserId="${callLoanInfo.userId}" ' +
									'userName="'+ rowObject["contactsName"] +'" ' +
									'recordMobile="'+ rowObject["contactsMobile"] +'" ' +
									' callLoanNid="${callLoanInfo.callLoanNid}"' +
									' borrowNid="book" ' +
									'anjianstauts="${callLoanInfo.status}" call="book" onclick="$(this).call()"/></a>'
								);
								result.push('<a title="添加催计"' +
									' href="javascript:void(-1);" style="color: blue;margin-left: 2px;"' +
									' onclick="addCuishouRecord(123,\'m100\',\''+rowObject["contactsName"]+'\',' +
									'\''+rowObject["contactsMobile"] +'\')">' +
									'<img src="static/images/icon5.png" height="17px" width="17px"></a>');
							}
							return result.join("");
						}
				}),
				setColumn("通话次数","callNumber",{width:75,formatter:
						function(cellvalue, options, rowObject){
							return cellvalue != null ? cellvalue : "";
						}
				}),
				setColumn("地区","mobileAddress",{width:60,formatter:
						function(cellvalue, options, rowObject){
							if(!cellvalue){
								return '<a href="javascript:void(0)" ' +
									'onclick="$(this).getMobileAddr(3,'+rowObject["contactsMobile"]+')"' +
									' style="color:blue">查询 </a>';
							}
							return cellvalue;
						}
				}),
				setColumn("最后通话时间","talkTime",{width:120,formatter:
						function(cellvalue, options, rowObject){
							return cellvalue != null ? cellvalue.substr(0,10) : "";
						}
				})
			],
			height:'680',
			multiselect: false,
			rowNum:20,
			rownumbers:false,
			rowList:[],
			recordtext:"共{2}条",
			gridComplete:function(){
				$("#callBookPage_center").remove();
			}
		});
    }
</script>
</body>
</html>

